﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:ser="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:tns="http://schemas.datacontract.org/2004/07/EzDesk.Apps.Model.Message" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/EzDesk.Apps.Model.Message" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" />
  <xs:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
  <xs:complexType name="Topic">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:MessageContent">
        <xs:sequence>
          <xs:element minOccurs="0" name="ConfirmedInfo" nillable="true" type="tns:ArrayOfMessageConfirm" />
          <xs:element minOccurs="0" name="CreateOn" type="xs:dateTime" />
          <xs:element minOccurs="0" name="NeedConfirm" type="xs:boolean" />
          <xs:element minOccurs="0" name="Participator" nillable="true" type="tns:ParticipatorsInfo" />
          <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="Recipient" nillable="true" type="q1:SimpleUser" />
          <xs:element minOccurs="0" name="ReplyList" nillable="true" type="tns:ArrayOfSingleMessage" />
          <xs:element xmlns:q2="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="Sender" nillable="true" type="q2:SimpleUser" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="Topic" nillable="true" type="tns:Topic" />
  <xs:complexType name="MessageContent">
    <xs:sequence>
      <xs:element minOccurs="0" name="MessageId" type="ser:guid" />
      <xs:element minOccurs="0" name="MessageText" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="MessageTitle" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="MessageContent" nillable="true" type="tns:MessageContent" />
  <xs:complexType name="ArrayOfMessageConfirm">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="MessageConfirm" nillable="true" type="tns:MessageConfirm" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfMessageConfirm" nillable="true" type="tns:ArrayOfMessageConfirm" />
  <xs:complexType name="MessageConfirm">
    <xs:sequence>
      <xs:element minOccurs="0" name="ConfirmOn" type="xs:dateTime" />
      <xs:element minOccurs="0" name="UserId" type="ser:guid" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="MessageConfirm" nillable="true" type="tns:MessageConfirm" />
  <xs:complexType name="ParticipatorsInfo">
    <xs:sequence>
      <xs:element xmlns:q3="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="AllUserMemebers" nillable="true" type="q3:ArrayOfSimpleUser" />
      <xs:element xmlns:q4="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="GroupParticipators" nillable="true" type="q4:ArrayOfGroup" />
      <xs:element minOccurs="0" name="Memberstring" nillable="true" type="xs:string" />
      <xs:element xmlns:q5="http://schemas.datacontract.org/2004/07/EzDesk.Core.Model" minOccurs="0" name="UserParticipators" nillable="true" type="q5:ArrayOfSimpleUser" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ParticipatorsInfo" nillable="true" type="tns:ParticipatorsInfo" />
  <xs:complexType name="ArrayOfSingleMessage">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="SingleMessage" nillable="true" type="tns:SingleMessage" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfSingleMessage" nillable="true" type="tns:ArrayOfSingleMessage" />
  <xs:complexType name="SingleMessage">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:MessageContent">
        <xs:sequence>
          <xs:element minOccurs="0" name="CreateOn" type="xs:dateTime" />
          <xs:element minOccurs="0" name="ParentMessageId" type="ser:guid" />
          <xs:element minOccurs="0" name="SenderId" type="ser:guid" />
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
  <xs:element name="SingleMessage" nillable="true" type="tns:SingleMessage" />
  <xs:complexType name="ArrayOfTopic">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Topic" nillable="true" type="tns:Topic" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfTopic" nillable="true" type="tns:ArrayOfTopic" />
</xs:schema>